#include "RenderManager.h"

RenderManager::RenderManager()
{
	RegisterAllRenders();
}

RenderManager::~RenderManager()
{

}

void RenderManager::Draw()
{
	int n = (int)mRenders.size();
	for (int i = 0; i < n; ++i)
	{
		mRenders[i]->draw();
	}
}

void RenderManager::Idle()
{
	int n = (int)mRenders.size();
	for (int i = 0; i < n; ++i)
	{
		mRenders[i]->idle();
	}
}

void RenderManager::AddRenders(std::shared_ptr<IRender> render)
{
	mRenders.push_back(render);
}